//
//  COCOAFANPreferencesWindowController.m
//  CocoaFan
//
//  Created by Chen Xianan on 2009-04-02.
//  Copyright 2009 realazy.org. All rights reserved.
//

#import "COCOAFANPreferencesWindowController.h"
#import "COCOAFANUserDefaultsController.h"

static int sizeValues[3] = [12, 14, 18];
static int intervalValues[6] = [0, 2, 5, 15, 30, 60];

@implementation COCOAFANPreferencesWindowController

- (id)init
{
	if (![super initWithWindowNibName:@"Preferences"]) return nil;
	sizeTexts = [[NSArray alloc] initWithObjects:
		[NSString stringWithFormat:NSLocalizedString(@"FONT_SMALL", nil)],
		[NSString stringWithFormat:NSLocalizedString(@"FONT_MEDIUM" ,nil)],
		[NSString stringWithFormat:NSLocalizedString(@"FONT_LARGE", nil)], nil];
	
	NSString *localizedMinutesString = NSLocalizedString(@"REFRASH_RATE_MINUTES", @"every %d minutes");
	NSString *localizedHourString = NSLocalizedString(@"REFRASH_RATE_HOUR", "every %@ hour");
	intervalTexts = [[NSArray alloc] initWithObjects:
		NSLocalizedString(@"REFRASH_RATE_NEVER", @"never"),
		[NSString stringWithFormat:localizedMinutesString intervalValues[1]],
		[NSString stringWithFormat:localizedMinutesString intervalValues[2]],
		[NSString stringWithFormat:localizedMinutesString intervalValues[3]],
		NSLocalizedString(@"REFRASH_RATE_HALFHOUR", @"every half hour"),
		NSLocalizedString(@"REFRASH_RATE_HOUR", @"every hour"), nil];

	return self;
}

		
- (void)dealloc
{
	[sizes release];
	[intervals release];
	[super dealloc];
}


@end
